from storehouse.models import product
from storehouse.models import barcode
def createBarCode(product): 
    barcode_o = barcode.objects.create(
                                       barcode_no = "%s/" %(product.symbol),
                                       path = "%s/" %(product.symbol)
                                       )
    barcode_o.save()
    barcode_o.barcode_no="%s%s" %(barcode_o.barcode_no,barcode_o.id)
    barcode_o.save()
    
    return barcode_o 